.class public Lcom/netease/newsreader/util/StringUtil;
.super Ljava/lang/Object;
.source "StringUtil.java"


# static fields
.field public static final ALREADY_VOTE:Ljava/lang/String; = "already_vote"

.field public static final BUILDING_ID:Ljava/lang/String; = "building_id"

.field public static final COMMENTS_REPLY_COUNT:Ljava/lang/String; = "reply_count"

.field public static final COMMENT_COLUMN_ID:Ljava/lang/String; = "comment_column_id"

.field public static final COMMENT_TYPE:Ljava/lang/String; = "comment_type"

.field public static final FEEDBACKURL:Ljava/lang/String; = "http://3g.163.com/bbs/bbs_news/3g/feedback.do"

.field public static final GETPUSHSERVERURL:Ljava/lang/String; = "http://c.3g.163.com/push/register/"

.field public static final HEAD_TYPE:I = 0x0

.field public static final HOT_COMMENT:Ljava/lang/String; = "hot"

.field public static final HotCommentsNum:I = 0x5

.field public static final IS_TOPIC:Ljava/lang/String; = "is_topic"

.field public static final LatestCommentsNum:I = 0x5

.field public static final LatestCommentsNumInOriginal:I = 0xa

.field private static final MIN:J = 0xea60L

.field public static final NEWSCLIENTSOURCE:Ljava/lang/String; = "<a href=\"http://m.163.com/newsapp/\">\u7f51\u6613Android\u65b0\u95fb\u5ba2\u6237\u7aef</a>"

.field public static final NEW_COMMENT:Ljava/lang/String; = "new"

.field public static final NEW_PUSHURL:Ljava/lang/String; = "http://p.3g.163.com/push/newsclient/"

.field public static final NONHEAD_TYPE:I = 0x1

.field public static final NOTICEURL:Ljava/lang/String; = "http://m.163.com/special/newsclient/android_notice.html"

.field public static final PAGE_DOWN_TYPE:I = 0x2

.field public static final PAGE_UP_TYPE:I = 0x1

.field public static final PHOTOSETINFOURL:Ljava/lang/String; = "http://c.3g.163.com/photo/api/set/0096/"

.field public static final PHOTOSETLISTURL:Ljava/lang/String; = "http://c.3g.163.com/photo/api/list/0096/4GJ60096"

.field public static final PHOTOSETMORELISTURL:Ljava/lang/String; = "http://c.3g.163.com/photo/api/morelist/0096/4GJ60096/"

.field public static final PHOTOSETNEWLISTURL:Ljava/lang/String; = "http://c.3g.163.com/photo/api/newlist/0096/4GJ60096/"

.field public static final PREFERENCE_SPECIAL_BANNER:Ljava/lang/String; = "banner"

.field public static final PUSHURL:Ljava/lang/String; = "http://220.181.8.204:8089/push/"

.field public static final RANK_COMMENTS_SOURCE:Ljava/lang/String; = "rank_comments_source"

.field public static final REGISTERURL:Ljava/lang/String; = "http://c.3g.163.com/urs/reg"

.field public static final SHARETOMICROBLOG:Ljava/lang/String; = "http://api.t.163.com/statuses/update.json"

.field public static final SPECIAL_TYPE:I = 0x3

.field public static final TIEFLOORSHORTURL:Ljava/lang/String; = "http://webshot.ws.126.net/"

.field public static final TIEURL:Ljava/lang/String; = "http://comment.news.163.com/"

.field public static final TOPIC:Ljava/lang/String; = "attitude"

.field public static final TOPIC_DOCID:Ljava/lang/String; = "docid"

.field public static final TOPIC_IMGSRC:Ljava/lang/String; = "imgsrc"

.field public static final TOPIC_PTIME:Ljava/lang/String; = "ptime"

.field public static final TOPIC_SPECIAL_ID:Ljava/lang/String; = "speciaID"

.field public static final TOPIC_SUBTITLE:Ljava/lang/String; = "subtitle"

.field public static final TOPIC_TITLE:Ljava/lang/String; = "title"

.field public static final TOPIC_TYPE:I = 0x2

.field public static final TOPIC_URL:Ljava/lang/String; = "url"

.field public static final TOP_COMMENTS_CONTENT:Ljava/lang/String; = "top_comments_content"

.field public static final TOP_COMMENTS_SOURCE:Ljava/lang/String; = "top_comments_source"

.field public static final VOTE:Ljava/lang/String; = "vote"

.field public static final VOTE_DATE:Ljava/lang/String; = "date"

.field public static final VOTE_DIGEST:Ljava/lang/String; = "digest"

.field public static final VOTE_DOCID:Ljava/lang/String; = "docid"

.field public static final VOTE_ID:Ljava/lang/String; = "vote_id"

.field public static final VOTE_ID_LIST:Ljava/lang/String; = "voteidlist"

.field public static final VOTE_IMGSRC:Ljava/lang/String; = "imgsrc"

.field public static final VOTE_ITEM_ID:Ljava/lang/String; = "id"

.field public static final VOTE_ITEM_LIST:Ljava/lang/String; = "voteitem"

.field public static final VOTE_ITEM_NAME:Ljava/lang/String; = "name"

.field public static final VOTE_ITEM_NUM:Ljava/lang/String; = "num"

.field public static final VOTE_QUESTION:Ljava/lang/String; = "question"

.field public static final XURL:Ljava/lang/String; = "http://reg.163.com/logins.jsp"

.field public static imageResize_Url:Ljava/lang/String; = null

.field public static final maxBuildingNum:I = 0xa

.field public static final perTimeNumber:I = 0x14

.field public static final topic_url:Ljava/lang/String; = "http://c.3g.163.com/nc/article/attitude/"

.field public static final topic_url_detailpage:Ljava/lang/String; = "http://c.3g.163.com/nc/article/"

.field public static final userAgent:Ljava/lang/String; = "NTES Android"

.field public static voteList_url:Ljava/lang/String;

.field public static voteOld_url:Ljava/lang/String;

.field public static voteSubmit_Url:Ljava/lang/String;


# direct methods
.method static constructor <clinit>()V
    .locals 1

    .prologue
    .line 65
    const-string v0, "http://c.3g.163.com/nc/vote/init/list.html"

    sput-object v0, Lcom/netease/newsreader/util/StringUtil;->voteList_url:Ljava/lang/String;

    .line 69
    const-string v0, "http://c.3g.163.com/nc/vote/result/"

    sput-object v0, Lcom/netease/newsreader/util/StringUtil;->voteOld_url:Ljava/lang/String;

    .line 73
    const-string v0, "http://vote.3g.163.com/vote2/mobileVote.do?vote"

    sput-object v0, Lcom/netease/newsreader/util/StringUtil;->voteSubmit_Url:Ljava/lang/String;

    .line 77
    const-string v0, "http://s.cimg.163.com/i/"

    sput-object v0, Lcom/netease/newsreader/util/StringUtil;->imageResize_Url:Ljava/lang/String;

    .line 13
    return-void
.end method

.method public constructor <init>()V
    .locals 0

    .prologue
    .line 13
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

.method public static URLEncode(Ljava/lang/String;)Ljava/lang/String;
    .locals 2
    .parameter "str"

    .prologue
    .line 342
    if-nez p0, :cond_0

    .line 343
    const-string v1, ""

    .line 347
    :goto_0
    return-object v1

    .line 345
    :cond_0
    :try_start_0
    const-string v1, "utf-8"

    invoke-static {p0, v1}, Ljava/net/URLEncoder;->encode(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    move-result-object v1

    goto :goto_0

    .line 346
    :catch_0
    move-exception v0

    .line 347
    .local v0, e:Ljava/lang/Exception;
    const-string v1, ""

    goto :goto_0
.end method

.method public static base64Encode(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
    .locals 1
    .parameter "str"
    .parameter "charset"

    .prologue
    .line 326
    if-nez p0, :cond_0

    .line 327
    const-string p0, ""

    .line 330
    .end local p0
    :goto_0
    return-object p0

    .line 328
    .restart local p0
    :cond_0
    :try_start_0
    invoke-static {p0, p1}, Lit/sauronsoftware/base64/Base64;->encode(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
    :try_end_0
    .catch Ljava/lang/RuntimeException; {:try_start_0 .. :try_end_0} :catch_0

    move-result-object p0

    goto :goto_0

    .line 329
    :catch_0
    move-exception v0

    .line 330
    .local v0, e:Ljava/lang/RuntimeException;
    goto :goto_0
.end method

.method public static compareDate(Ljava/lang/String;Ljava/lang/String;)Z
    .locals 11
    .parameter "endDate"
    .parameter "beginDate"

    .prologue
    .line 286
    const-string v6, "yyyy-MM-dd HH:mm:ss"

    .line 288
    .local v6, fomat:Ljava/lang/String;
    :try_start_0
    new-instance v3, Ljava/text/SimpleDateFormat;

    invoke-direct {v3, v6}, Ljava/text/SimpleDateFormat;-><init>(Ljava/lang/String;)V

    .line 289
    .local v3, dfs:Ljava/text/SimpleDateFormat;
    invoke-virtual {v3, p1}, Ljava/text/SimpleDateFormat;->parse(Ljava/lang/String;)Ljava/util/Date;

    move-result-object v0

    .line 290
    .local v0, begin:Ljava/util/Date;
    invoke-virtual {v3, p0}, Ljava/text/SimpleDateFormat;->parse(Ljava/lang/String;)Ljava/util/Date;

    move-result-object v5

    .line 291
    .local v5, end:Ljava/util/Date;
    invoke-virtual {v5}, Ljava/util/Date;->getTime()J

    move-result-wide v7

    invoke-virtual {v0}, Ljava/util/Date;->getTime()J
    :try_end_0
    .catch Ljava/text/ParseException; {:try_start_0 .. :try_end_0} :catch_0

    move-result-wide v9

    sub-long v1, v7, v9

    .line 293
    .local v1, between:J
    const-wide/16 v7, 0x0

    cmp-long v7, v1, v7

    if-lez v7, :cond_0

    .line 294
    const/4 v7, 0x1

    .line 301
    .end local v0           #begin:Ljava/util/Date;
    .end local v1           #between:J
    .end local v3           #dfs:Ljava/text/SimpleDateFormat;
    .end local v5           #end:Ljava/util/Date;
    :goto_0
    return v7

    .line 297
    :catch_0
    move-exception v4

    .line 298
    .local v4, e:Ljava/text/ParseException;
    invoke-virtual {v4}, Ljava/text/ParseException;->printStackTrace()V

    .line 301
    .end local v4           #e:Ljava/text/ParseException;
    :cond_0
    const/4 v7, 0x0

    goto :goto_0
.end method

.method public static encode(Ljava/lang/String;)Ljava/lang/String;
    .locals 2
    .parameter "str"

    .prologue
    .line 359
    :try_start_0
    const-string v1, "utf-8"

    invoke-static {p0, v1}, Lcom/netease/newsreader/util/StringUtil;->base64Encode(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object p0

    .line 360
    invoke-static {p0}, Lcom/netease/newsreader/util/StringUtil;->URLEncode(Ljava/lang/String;)Ljava/lang/String;
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    move-result-object p0

    .line 362
    .local v0, e:Ljava/lang/Exception;
    :goto_0
    return-object p0

    .line 361
    .end local v0           #e:Ljava/lang/Exception;
    :catch_0
    move-exception v0

    .line 362
    .restart local v0       #e:Ljava/lang/Exception;
    goto :goto_0
.end method

.method public static getCurrnetDate(Ljava/lang/String;)Ljava/lang/String;
    .locals 2
    .parameter "format"

    .prologue
    .line 152
    new-instance v0, Ljava/text/SimpleDateFormat;

    invoke-direct {v0, p0}, Ljava/text/SimpleDateFormat;-><init>(Ljava/lang/String;)V

    .line 153
    .local v0, sdf:Ljava/text/SimpleDateFormat;
    new-instance v1, Ljava/util/Date;

    invoke-direct {v1}, Ljava/util/Date;-><init>()V

    invoke-virtual {v0, v1}, Ljava/text/SimpleDateFormat;->format(Ljava/util/Date;)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/String;->toString()Ljava/lang/String;

    move-result-object v1

    return-object v1
.end method

.method public static getDate(Ljava/lang/String;)Ljava/lang/String;
    .locals 21
    .parameter "date"

    .prologue
    .line 222
    if-eqz p0, :cond_0

    const-string v17, ""

    move-object/from16 v0, v17

    move-object/from16 v1, p0

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v17

    if-eqz v17, :cond_1

    .line 223
    :cond_0
    const-string p0, ""

    .line 253
    .local v10, fomat:Ljava/lang/String;
    :goto_0
    return-object p0

    .line 225
    .end local v10           #fomat:Ljava/lang/String;
    :cond_1
    const-string v10, "yyyy-MM-dd HH:mm:ss"

    .line 227
    .restart local v10       #fomat:Ljava/lang/String;
    :try_start_0
    new-instance v7, Ljava/text/SimpleDateFormat;

    invoke-direct {v7, v10}, Ljava/text/SimpleDateFormat;-><init>(Ljava/lang/String;)V

    .line 228
    .local v7, dfs:Ljava/text/SimpleDateFormat;
    move-object/from16 v0, p0

    invoke-virtual {v7, v0}, Ljava/text/SimpleDateFormat;->parse(Ljava/lang/String;)Ljava/util/Date;

    move-result-object v2

    .line 229
    .local v2, begin:Ljava/util/Date;
    invoke-static {v10}, Lcom/netease/newsreader/util/StringUtil;->getCurrnetDate(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v17

    move-object/from16 v0, v17

    invoke-virtual {v7, v0}, Ljava/text/SimpleDateFormat;->parse(Ljava/lang/String;)Ljava/util/Date;

    move-result-object v9

    .line 230
    .local v9, end:Ljava/util/Date;
    invoke-virtual {v9}, Ljava/util/Date;->getTime()J

    move-result-wide v17

    invoke-virtual {v2}, Ljava/util/Date;->getTime()J

    move-result-wide v19

    sub-long v17, v17, v19

    const-wide/16 v19, 0x3e8

    div-long v3, v17, v19

    .line 232
    .local v3, between:J
    const-wide/32 v17, 0x15180

    div-long v5, v3, v17

    .line 233
    .local v5, day:J
    const-wide/32 v17, 0x15180

    rem-long v17, v3, v17

    const-wide/16 v19, 0xe10

    div-long v11, v17, v19

    .line 234
    .local v11, hour:J
    const-wide/16 v17, 0xe10

    rem-long v17, v3, v17

    const-wide/16 v19, 0x3c

    div-long v13, v17, v19

    .line 235
    .local v13, minute:J
    const-wide/16 v17, 0x3c

    rem-long v17, v3, v17

    const-wide/16 v19, 0x3c

    div-long v15, v17, v19

    .line 237
    .local v15, second:J
    const-wide/16 v17, 0x1

    cmp-long v17, v5, v17

    if-ltz v17, :cond_2

    .line 238
    new-instance v17, Ljava/text/SimpleDateFormat;

    const-string v18, "yyyy-MM-dd"

    invoke-direct/range {v17 .. v18}, Ljava/text/SimpleDateFormat;-><init>(Ljava/lang/String;)V

    move-object/from16 v0, v17

    invoke-virtual {v0, v2}, Ljava/text/SimpleDateFormat;->format(Ljava/util/Date;)Ljava/lang/String;

    move-result-object p0

    goto :goto_0

    .line 239
    :cond_2
    const-wide/16 v17, 0x0

    cmp-long v17, v11, v17

    if-lez v17, :cond_3

    const-wide/16 v17, 0x0

    cmp-long v17, v5, v17

    if-nez v17, :cond_3

    .line 240
    new-instance v17, Ljava/lang/StringBuilder;

    invoke-static {v11, v12}, Ljava/lang/String;->valueOf(J)Ljava/lang/String;

    move-result-object v18

    invoke-direct/range {v17 .. v18}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v18, "\u5c0f\u65f6\u524d"

    invoke-virtual/range {v17 .. v18}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v17

    invoke-virtual/range {v17 .. v17}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p0

    goto :goto_0

    .line 241
    :cond_3
    const-wide/16 v17, 0x0

    cmp-long v17, v13, v17

    if-lez v17, :cond_4

    const-wide/16 v17, 0x0

    cmp-long v17, v11, v17

    if-nez v17, :cond_4

    const-wide/16 v17, 0x0

    cmp-long v17, v5, v17

    if-nez v17, :cond_4

    .line 242
    new-instance v17, Ljava/lang/StringBuilder;

    invoke-static {v13, v14}, Ljava/lang/String;->valueOf(J)Ljava/lang/String;

    move-result-object v18

    invoke-direct/range {v17 .. v18}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v18, "\u5206\u949f\u524d"

    invoke-virtual/range {v17 .. v18}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v17

    invoke-virtual/range {v17 .. v17}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p0

    goto/16 :goto_0

    .line 246
    :cond_4
    const-string p0, "1\u5206\u949f\u524d"
    :try_end_0
    .catch Ljava/text/ParseException; {:try_start_0 .. :try_end_0} :catch_0

    goto/16 :goto_0

    .line 249
    .end local v2           #begin:Ljava/util/Date;
    .end local v3           #between:J
    .end local v5           #day:J
    .end local v7           #dfs:Ljava/text/SimpleDateFormat;
    .end local v9           #end:Ljava/util/Date;
    .end local v11           #hour:J
    .end local v13           #minute:J
    .end local v15           #second:J
    :catch_0
    move-exception v8

    .line 250
    .local v8, e:Ljava/text/ParseException;
    invoke-virtual {v8}, Ljava/text/ParseException;->printStackTrace()V

    goto/16 :goto_0
.end method

.method public static getDate(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
    .locals 19
    .parameter "date"
    .parameter "format"

    .prologue
    .line 258
    :try_start_0
    new-instance v6, Ljava/text/SimpleDateFormat;

    move-object/from16 v0, p1

    invoke-direct {v6, v0}, Ljava/text/SimpleDateFormat;-><init>(Ljava/lang/String;)V

    .line 259
    .local v6, dfs:Ljava/text/SimpleDateFormat;
    move-object/from16 v0, p0

    invoke-virtual {v6, v0}, Ljava/text/SimpleDateFormat;->parse(Ljava/lang/String;)Ljava/util/Date;

    move-result-object v1

    .line 260
    .local v1, begin:Ljava/util/Date;
    invoke-static/range {p1 .. p1}, Lcom/netease/newsreader/util/StringUtil;->getCurrnetDate(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v15

    invoke-virtual {v6, v15}, Ljava/text/SimpleDateFormat;->parse(Ljava/lang/String;)Ljava/util/Date;

    move-result-object v8

    .line 261
    .local v8, end:Ljava/util/Date;
    invoke-virtual {v8}, Ljava/util/Date;->getTime()J

    move-result-wide v15

    invoke-virtual {v1}, Ljava/util/Date;->getTime()J

    move-result-wide v17

    sub-long v15, v15, v17

    const-wide/16 v17, 0x3e8

    div-long v2, v15, v17

    .line 263
    .local v2, between:J
    const-wide/32 v15, 0x15180

    div-long v4, v2, v15

    .line 264
    .local v4, day:J
    const-wide/32 v15, 0x15180

    rem-long v15, v2, v15

    const-wide/16 v17, 0xe10

    div-long v9, v15, v17

    .line 265
    .local v9, hour:J
    const-wide/16 v15, 0xe10

    rem-long v15, v2, v15

    const-wide/16 v17, 0x3c

    div-long v11, v15, v17

    .line 266
    .local v11, minute:J
    const-wide/16 v15, 0x3c

    rem-long v15, v2, v15

    const-wide/16 v17, 0x3c

    div-long v13, v15, v17

    .line 268
    .local v13, second:J
    const-wide/16 v15, 0x1

    cmp-long v15, v4, v15

    if-ltz v15, :cond_1

    .line 269
    new-instance v15, Ljava/text/SimpleDateFormat;

    const-string v16, "yyyy-MM-dd"

    invoke-direct/range {v15 .. v16}, Ljava/text/SimpleDateFormat;-><init>(Ljava/lang/String;)V

    invoke-virtual {v15, v1}, Ljava/text/SimpleDateFormat;->format(Ljava/util/Date;)Ljava/lang/String;

    move-result-object p0

    .line 282
    .end local v1           #begin:Ljava/util/Date;
    .end local v2           #between:J
    .end local v4           #day:J
    .end local v6           #dfs:Ljava/text/SimpleDateFormat;
    .end local v8           #end:Ljava/util/Date;
    .end local v9           #hour:J
    .end local v11           #minute:J
    .end local v13           #second:J
    :cond_0
    :goto_0
    return-object p0

    .line 270
    .restart local v1       #begin:Ljava/util/Date;
    .restart local v2       #between:J
    .restart local v4       #day:J
    .restart local v6       #dfs:Ljava/text/SimpleDateFormat;
    .restart local v8       #end:Ljava/util/Date;
    .restart local v9       #hour:J
    .restart local v11       #minute:J
    .restart local v13       #second:J
    :cond_1
    const-wide/16 v15, 0x0

    cmp-long v15, v9, v15

    if-lez v15, :cond_2

    const-wide/16 v15, 0x0

    cmp-long v15, v4, v15

    if-nez v15, :cond_2

    .line 271
    new-instance v15, Ljava/lang/StringBuilder;

    invoke-static {v9, v10}, Ljava/lang/String;->valueOf(J)Ljava/lang/String;

    move-result-object v16

    invoke-direct/range {v15 .. v16}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v16, "\u5c0f\u65f6\u524d"

    invoke-virtual/range {v15 .. v16}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v15

    invoke-virtual {v15}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p0

    goto :goto_0

    .line 272
    :cond_2
    const-wide/16 v15, 0x0

    cmp-long v15, v11, v15

    if-lez v15, :cond_3

    const-wide/16 v15, 0x0

    cmp-long v15, v9, v15

    if-nez v15, :cond_3

    const-wide/16 v15, 0x0

    cmp-long v15, v4, v15

    if-nez v15, :cond_3

    .line 273
    new-instance v15, Ljava/lang/StringBuilder;

    invoke-static {v11, v12}, Ljava/lang/String;->valueOf(J)Ljava/lang/String;

    move-result-object v16

    invoke-direct/range {v15 .. v16}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v16, "\u5206\u949f\u524d"

    invoke-virtual/range {v15 .. v16}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v15

    invoke-virtual {v15}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p0

    goto :goto_0

    .line 274
    :cond_3
    const-wide/16 v15, 0x0

    cmp-long v15, v13, v15

    if-lez v15, :cond_0

    const-wide/16 v15, 0x0

    cmp-long v15, v11, v15

    if-nez v15, :cond_0

    const-wide/16 v15, 0x0

    cmp-long v15, v9, v15

    if-nez v15, :cond_0

    const-wide/16 v15, 0x0

    cmp-long v15, v4, v15

    if-nez v15, :cond_0

    .line 275
    new-instance v15, Ljava/lang/StringBuilder;

    invoke-static {v13, v14}, Ljava/lang/String;->valueOf(J)Ljava/lang/String;

    move-result-object v16

    invoke-direct/range {v15 .. v16}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v16, "\u79d2\u524d"

    invoke-virtual/range {v15 .. v16}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v15

    invoke-virtual {v15}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
    :try_end_0
    .catch Ljava/text/ParseException; {:try_start_0 .. :try_end_0} :catch_0

    move-result-object p0

    goto :goto_0

    .line 278
    .end local v1           #begin:Ljava/util/Date;
    .end local v2           #between:J
    .end local v4           #day:J
    .end local v6           #dfs:Ljava/text/SimpleDateFormat;
    .end local v8           #end:Ljava/util/Date;
    .end local v9           #hour:J
    .end local v11           #minute:J
    .end local v13           #second:J
    :catch_0
    move-exception v7

    .line 279
    .local v7, e:Ljava/text/ParseException;
    invoke-virtual {v7}, Ljava/text/ParseException;->printStackTrace()V

    goto :goto_0
.end method

.method public static getDateForRefresh(J)Ljava/lang/String;
    .locals 20
    .parameter "refreshTime"

    .prologue
    .line 182
    const-string v5, ""

    .line 186
    .local v5, date:Ljava/lang/String;
    :try_start_0
    new-instance v2, Ljava/util/Date;

    move-wide/from16 v0, p0

    invoke-direct {v2, v0, v1}, Ljava/util/Date;-><init>(J)V

    .line 187
    .local v2, begin:Ljava/util/Date;
    new-instance v9, Ljava/util/Date;

    invoke-direct {v9}, Ljava/util/Date;-><init>()V

    .line 188
    .local v9, end:Ljava/util/Date;
    invoke-virtual {v9}, Ljava/util/Date;->getTime()J

    move-result-wide v16

    invoke-virtual {v2}, Ljava/util/Date;->getTime()J

    move-result-wide v18

    sub-long v16, v16, v18

    const-wide/16 v18, 0x3e8

    div-long v3, v16, v18

    .line 190
    .local v3, between:J
    const-wide/32 v16, 0x15180

    div-long v6, v3, v16

    .line 191
    .local v6, day:J
    const-wide/32 v16, 0x15180

    rem-long v16, v3, v16

    const-wide/16 v18, 0xe10

    div-long v10, v16, v18

    .line 192
    .local v10, hour:J
    const-wide/16 v16, 0xe10

    rem-long v16, v3, v16

    const-wide/16 v18, 0x3c

    div-long v12, v16, v18

    .line 193
    .local v12, minute:J
    const-wide/16 v16, 0x3c

    rem-long v16, v3, v16

    const-wide/16 v18, 0x3c

    div-long v14, v16, v18

    .line 195
    .local v14, second:J
    const-wide/16 v16, 0x1

    cmp-long v16, v6, v16

    if-ltz v16, :cond_0

    .line 196
    new-instance v16, Ljava/text/SimpleDateFormat;

    const-string v17, "MM\u6708dd\u65e5"

    invoke-direct/range {v16 .. v17}, Ljava/text/SimpleDateFormat;-><init>(Ljava/lang/String;)V

    move-object/from16 v0, v16

    invoke-virtual {v0, v2}, Ljava/text/SimpleDateFormat;->format(Ljava/util/Date;)Ljava/lang/String;
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    move-result-object v5

    .line 210
    .end local v2           #begin:Ljava/util/Date;
    .end local v3           #between:J
    .end local v6           #day:J
    .end local v9           #end:Ljava/util/Date;
    .end local v10           #hour:J
    .end local v12           #minute:J
    .end local v14           #second:J
    :goto_0
    invoke-static {v5}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v16

    if-nez v16, :cond_3

    .line 211
    new-instance v16, Ljava/lang/StringBuilder;

    invoke-static {v5}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v17

    invoke-direct/range {v16 .. v17}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v17, "\u66f4\u65b0"

    invoke-virtual/range {v16 .. v17}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v16

    invoke-virtual/range {v16 .. v16}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v16

    .line 213
    :goto_1
    return-object v16

    .line 197
    .restart local v2       #begin:Ljava/util/Date;
    .restart local v3       #between:J
    .restart local v6       #day:J
    .restart local v9       #end:Ljava/util/Date;
    .restart local v10       #hour:J
    .restart local v12       #minute:J
    .restart local v14       #second:J
    :cond_0
    const-wide/16 v16, 0x0

    cmp-long v16, v10, v16

    if-lez v16, :cond_1

    const-wide/16 v16, 0x0

    cmp-long v16, v6, v16

    if-nez v16, :cond_1

    .line 198
    :try_start_1
    new-instance v16, Ljava/lang/StringBuilder;

    invoke-static {v10, v11}, Ljava/lang/String;->valueOf(J)Ljava/lang/String;

    move-result-object v17

    invoke-direct/range {v16 .. v17}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v17, "\u5c0f\u65f6\u524d"

    invoke-virtual/range {v16 .. v17}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v16

    invoke-virtual/range {v16 .. v16}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v5

    goto :goto_0

    .line 199
    :cond_1
    const-wide/16 v16, 0x0

    cmp-long v16, v12, v16

    if-lez v16, :cond_2

    const-wide/16 v16, 0x0

    cmp-long v16, v10, v16

    if-nez v16, :cond_2

    const-wide/16 v16, 0x0

    cmp-long v16, v6, v16

    if-nez v16, :cond_2

    .line 200
    new-instance v16, Ljava/lang/StringBuilder;

    invoke-static {v12, v13}, Ljava/lang/String;->valueOf(J)Ljava/lang/String;

    move-result-object v17

    invoke-direct/range {v16 .. v17}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v17, "\u5206\u949f\u524d"

    invoke-virtual/range {v16 .. v17}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v16

    invoke-virtual/range {v16 .. v16}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v5

    goto :goto_0

    .line 204
    :cond_2
    const-string v5, "1\u5206\u949f\u524d"
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_0

    goto :goto_0

    .line 207
    .end local v2           #begin:Ljava/util/Date;
    .end local v3           #between:J
    .end local v6           #day:J
    .end local v9           #end:Ljava/util/Date;
    .end local v10           #hour:J
    .end local v12           #minute:J
    .end local v14           #second:J
    :catch_0
    move-exception v8

    .line 208
    .local v8, e:Ljava/lang/Exception;
    invoke-virtual {v8}, Ljava/lang/Exception;->printStackTrace()V

    goto :goto_0

    .line 213
    .end local v8           #e:Ljava/lang/Exception;
    :cond_3
    const-string v16, ""

    goto :goto_1
.end method

.method public static getHourSecond(Ljava/util/Date;)Ljava/lang/String;
    .locals 5
    .parameter "date"

    .prologue
    .line 174
    const-string v1, "yyyy-MM-dd HH:mm:ss"

    .line 175
    .local v1, fomat:Ljava/lang/String;
    new-instance v0, Ljava/text/SimpleDateFormat;

    invoke-direct {v0, v1}, Ljava/text/SimpleDateFormat;-><init>(Ljava/lang/String;)V

    .line 176
    .local v0, dfs:Ljava/text/SimpleDateFormat;
    invoke-virtual {v0, p0}, Ljava/text/SimpleDateFormat;->format(Ljava/util/Date;)Ljava/lang/String;

    move-result-object v2

    .line 178
    .local v2, rst:Ljava/lang/String;
    const/16 v3, 0xa

    const/16 v4, 0xf

    invoke-virtual {v2, v3, v4}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v3

    return-object v3
.end method

.method public static getPercent(IJ)F
    .locals 6
    .parameter "itemNum"
    .parameter "allVoteNum"

    .prologue
    .line 163
    int-to-float v4, p0

    long-to-float v5, p1

    div-float v2, v4, v5

    .line 165
    .local v2, p:F
    new-instance v0, Ljava/text/DecimalFormat;

    const-string v4, "0.00"

    invoke-direct {v0, v4}, Ljava/text/DecimalFormat;-><init>(Ljava/lang/String;)V

    .line 166
    .local v0, df:Ljava/text/DecimalFormat;
    float-to-double v4, v2

    invoke-virtual {v0, v4, v5}, Ljava/text/DecimalFormat;->format(D)Ljava/lang/String;

    move-result-object v3

    .line 167
    .local v3, s:Ljava/lang/String;
    invoke-static {v3}, Ljava/lang/Float;->parseFloat(Ljava/lang/String;)F

    move-result v1

    .line 169
    .local v1, f:F
    return v1
.end method

.method public static getRefreshTimeStr(Landroid/content/Context;Ljava/lang/String;)Ljava/lang/String;
    .locals 8
    .parameter "context"
    .parameter "key"

    .prologue
    const-wide/16 v6, -0x1

    .line 422
    invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v4

    if-eqz v4, :cond_0

    .line 423
    const-string v2, ""

    .line 434
    :goto_0
    return-object v2

    .line 426
    :cond_0
    const-string v4, "refresh_time_sp"

    const/4 v5, 0x0

    invoke-virtual {p0, v4, v5}, Landroid/content/Context;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;

    move-result-object v3

    .line 428
    .local v3, sp:Landroid/content/SharedPreferences;
    invoke-interface {v3, p1, v6, v7}, Landroid/content/SharedPreferences;->getLong(Ljava/lang/String;J)J

    move-result-wide v0

    .line 429
    .local v0, lastRefresh:J
    cmp-long v4, v0, v6

    if-nez v4, :cond_1

    .line 430
    const-string v2, ""

    .local v2, refreshStr:Ljava/lang/String;
    goto :goto_0

    .line 432
    .end local v2           #refreshStr:Ljava/lang/String;
    :cond_1
    invoke-static {v0, v1}, Lcom/netease/newsreader/util/StringUtil;->getDateForRefresh(J)Ljava/lang/String;

    move-result-object v2

    .restart local v2       #refreshStr:Ljava/lang/String;
    goto :goto_0
.end method

.method public static isExactPicUrl(Ljava/lang/String;)Z
    .locals 1
    .parameter "imgUrl"

    .prologue
    .line 314
    const-string v0, ".jpg"

    invoke-virtual {p0, v0}, Ljava/lang/String;->endsWith(Ljava/lang/String;)Z

    move-result v0

    if-nez v0, :cond_0

    const-string v0, ".gif"

    invoke-virtual {p0, v0}, Ljava/lang/String;->endsWith(Ljava/lang/String;)Z

    move-result v0

    if-nez v0, :cond_0

    const-string v0, ".png"

    invoke-virtual {p0, v0}, Ljava/lang/String;->endsWith(Ljava/lang/String;)Z

    move-result v0

    if-nez v0, :cond_0

    const-string v0, ".jpeg"

    invoke-virtual {p0, v0}, Ljava/lang/String;->endsWith(Ljava/lang/String;)Z

    move-result v0

    if-nez v0, :cond_0

    const/4 v0, 0x0

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x1

    goto :goto_0
.end method

.method public static isNeedRefresh(Landroid/content/Context;Ljava/lang/String;)Z
    .locals 1
    .parameter "context"
    .parameter "key"

    .prologue
    .line 409
    const/16 v0, 0xa

    invoke-static {p0, p1, v0}, Lcom/netease/newsreader/util/StringUtil;->isNeedRefresh(Landroid/content/Context;Ljava/lang/String;I)Z

    move-result v0

    return v0
.end method

.method public static isNeedRefresh(Landroid/content/Context;Ljava/lang/String;I)Z
    .locals 11
    .parameter "context"
    .parameter "key"
    .parameter "min"

    .prologue
    const-wide/16 v6, -0x1

    const/4 v3, 0x1

    const/4 v4, 0x0

    .line 395
    invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v5

    if-eqz v5, :cond_1

    .line 404
    :cond_0
    :goto_0
    return v3

    .line 399
    :cond_1
    const-string v5, "refresh_time_sp"

    invoke-virtual {p0, v5, v4}, Landroid/content/Context;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;

    move-result-object v2

    .line 400
    .local v2, sp:Landroid/content/SharedPreferences;
    invoke-interface {v2, p1, v6, v7}, Landroid/content/SharedPreferences;->getLong(Ljava/lang/String;J)J

    move-result-wide v0

    .line 401
    .local v0, lastRefreshTime:J
    cmp-long v5, v0, v6

    if-eqz v5, :cond_0

    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v5

    sub-long/2addr v5, v0

    int-to-long v7, p2

    const-wide/32 v9, 0xea60

    mul-long/2addr v7, v9

    cmp-long v5, v5, v7

    if-gez v5, :cond_0

    move v3, v4

    .line 404
    goto :goto_0
.end method

.method public static replaceEnter(Ljava/lang/String;)Ljava/lang/String;
    .locals 2
    .parameter "str"

    .prologue
    .line 372
    const-string v0, "\'"

    const-string v1, ""

    invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;

    move-result-object p0

    .line 373
    const/16 v0, 0xa

    const/16 v1, 0x20

    invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(CC)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public static updateRefreshTime(Landroid/content/Context;Ljava/lang/String;)V
    .locals 4
    .parameter "context"
    .parameter "key"

    .prologue
    .line 413
    invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v1

    if-eqz v1, :cond_0

    .line 419
    :goto_0
    return-void

    .line 417
    :cond_0
    const-string v1, "refresh_time_sp"

    const/4 v2, 0x0

    invoke-virtual {p0, v1, v2}, Landroid/content/Context;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;

    move-result-object v0

    .line 418
    .local v0, sp:Landroid/content/SharedPreferences;
    invoke-interface {v0}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;

    move-result-object v1

    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v2

    invoke-interface {v1, p1, v2, v3}, Landroid/content/SharedPreferences$Editor;->putLong(Ljava/lang/String;J)Landroid/content/SharedPreferences$Editor;

    move-result-object v1

    invoke-interface {v1}, Landroid/content/SharedPreferences$Editor;->commit()Z

    goto :goto_0
.end method

.method public static valideEventParam(Ljava/lang/String;)Ljava/lang/String;
    .locals 2
    .parameter "param"

    .prologue
    .line 381
    if-eqz p0, :cond_1

    .line 382
    invoke-virtual {p0}, Ljava/lang/String;->length()I

    move-result v0

    const/16 v1, 0x40

    if-le v0, v1, :cond_0

    .line 383
    const/4 v0, 0x0

    const/16 v1, 0x3f

    invoke-virtual {p0, v0, v1}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object p0

    .line 385
    :cond_0
    invoke-static {p0}, Lcom/netease/newsreader/util/StringUtil;->replaceEnter(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    .line 387
    :goto_0
    return-object v0

    :cond_1
    const-string v0, "nodefine"

    goto :goto_0
.end method
